import axios from './axios'

// 获取用户列表数据
export function getuser(data) {
    return axios({
        url:'/api/users',
        method:'get',
        params:data
    })
}

// 添加用户
export function adduser(data) {
    return axios({
        url:'/api/users/add',
        method:'post',
        data
    })
}

// 编辑用户
export function edituser(data) {
    return axios({
        url:'/api/users/'+data.id,
        method:'PUT',
        data
    })
}

// 删除用户
export function deluser(data) {
    return axios({
        url:'/api/users/'+data.id,
        method:'DELETE',
        data
    })
}